import requests

from config import BASE_URL


class LoginApi(object):

    @classmethod
    def login(cls, body):
        url = f"{BASE_URL}/api/sys/login"
        headers = {"Content-Type": "application/json"}
        return requests.post(url=url, headers=headers, json=body)


if __name__ == '__main__':
    data = {
        "mobile": "13800000002",
        "password": "123456"
    }
    resp = LoginApi.login(body=data)
    print(resp.json())
